SystemTask
SystemTask Give DAs a chance to perform periodic actions
#include <Desk.h> Desk Manager
void SystemTask( );
Call SystemTask at least once each time through your event loop. It lets the
Desk Manager process such periodic DA events as updating the display of a
clock.
Returns: none

Notes: SystemTask should be called at least once every 17ms (1/60-th of a
second). Normal usage is to put it inside a part of the event loop that
always gets executed:
main()
{
.
. ... initialize other stuff ...
.
while (TRUE) fi/* Loop forever; terminate via */
EventLoop(); /* ExitToShell elsewhere */
}
EventLoop()
{
MaintainCursor();
MaintainMenus();
if ( GetNextEvent( everyEvent, & theEvent) ) {
.
. ... process events ...
.
}
}
DAs wanting a timeslice every so often should set bit 5 of the drvrFlags
word and a tick count in drvrDelay in the driver header. You should not
depend on any particular accuracy, since an application may fail to call
SystemTask often enough (e.g., when saving a file). To receive periodic
timeslices with more accuracy, install a vertical retrace task via VInstall
or a timer interrupt task via InsTime.